import { getCatelist } from "../../../require/api";

const state = {
    cateList: []
}
const getters = {
    getCate(state) {
        return state.cateList
    }
}
const mutations = {
    GCATELIST(state, payload) {
        state.cateList = payload
    }
}
const actions = {
    getCateAction({ commit }, data) {
        getCatelist(data).then((res) => {
            commit("GCATELIST", res.list)
            // console.log(res, '------');
        })
    }
}
export default {
    state,
    mutations,
    getters,
    actions,
    namespaced: true
}